using System;
using System.ComponentModel.DataAnnotations;

namespace Outpatient.Doman.SmartClinic
{
    /// <summary>
    /// 医疗卡办理实体类
    /// </summary>
    public class MedicalCardRegistration
    {
        /// <summary>
        /// 医疗卡注册ID - 主键，自增
        /// </summary>
        [Key]
        public int MedicalCardRegistrationId { get; set; }

        /// <summary>
        /// 卡号 - 自动生成从10001开始，最大长度20位
        /// </summary>
        [Required]
        [StringLength(20)]
        public string Card_number { get; set; } = string.Empty;

        /// <summary>
        /// 用户姓名 - 必填，最大长度50位
        /// </summary>
        [Required]
        [StringLength(50)]
        public string Name { get; set; } = string.Empty;

        /// <summary>
        /// 性别 - true=男，false=女
        /// </summary>
        public bool Gender { get; set; }

        /// <summary>
        /// 年龄
        /// </summary>
        public int Age { get; set; }

        /// <summary>
        /// 详细住址 - 最大长度200位
        /// </summary>
        [StringLength(200)]
        public string Address { get; set; } = string.Empty;

        /// <summary>
        /// 联系电话 - 最大长度20位
        /// </summary>
        [StringLength(20)]
        public string Phone { get; set; } = string.Empty;

        /// <summary>
        /// 民族外键 - 关联Ethnic_group表
        /// </summary>
        public int Ethnicity { get; set; }

        /// <summary>
        /// 文化程度外键 - 关联Culture表
        /// </summary>
        public int EducationLevel { get; set; }

        /// <summary>
        /// 职业外键 - 关联Occupation表
        /// </summary>
        public int OccupationId { get; set; }

        /// <summary>
        /// 邮政编码 - 最大长度10位
        /// </summary>
        [StringLength(10)]
        public string PostalCode { get; set; } = string.Empty;

        /// <summary>
        /// 婚姻状况 - true=已婚，false=未婚
        /// </summary>
        public bool MaritalStatus { get; set; }

        /// <summary>
        /// 出生日期
        /// </summary>
        public DateTime DateOfBirth { get; set; }

        /// <summary>
        /// 身份证号码 - 最大长度18位
        /// </summary>
        [StringLength(18)]
        public string IDNumber { get; set; } = string.Empty;

        /// <summary>
        /// 逻辑删除标志 - 默认false未删除，true已删除
        /// </summary>
        public bool IsDelete { get; set; } = false;


        /// <summary>
        /// 发药
        /// </summary>
        public bool ?Fayao {  get; set; }=false;

        /// <summary>
        /// 打单
        /// </summary>
        public bool ?Dadan {  get; set; }=false;


        /// <summary>
        /// 导航属性 - 关联民族表
        /// </summary>
        public virtual Ethnic_group? EthnicGroup { get; set; }

        /// <summary>
        /// 导航属性 - 关联文化程度表
        /// </summary>
        public virtual Culture? Culture { get; set; }

        /// <summary>
        /// 导航属性 - 关联职业表
        /// </summary>
        public virtual Occupation? Occupation { get; set; }
    }
} 